In many applications, such as image processing applications, it is often required to perform several preprocessing algorithms to an image prior to applying high level processing algorithms such as edge detection and feature detection. The preprocessing steps usually include filtering or noise reduction, to suitably condition the image for more complex processing algorithms. One such preprocessing step is a medial filtering.
Median filtering is a common digital filtering technique applied to an image to reduce various signal noise such as speckle noise and salt and pepper noise to condition the image for further processing. Image processing applications usually implement median filtering algorithms because of their capability to preserve edges of the image.
Typically, a median filtering algorithm computes a median value from a set of values. In order to select a median value from a set of values, a sorting algorithm is first applied to sort the set of values into an ascending or a descending order. The median value is then selected as the value that is positioned in the middle of the set.
However, it has been generally observed that the median filtering algorithm as described above is often time consuming and thus reduces the speed of a processor implementing the algorithm. The time taken for sorting a data set is directly proportional to the size of the set. Hence, it is usually seen that in order to determine a media value from a large set of values, the time taken to do the computation increases substantially.